|
SET OBJECT DIFFUSE
This command will alter the material diffuse component of the object.
SET OBJECT DIFFUSE Object Number, Color Value
SET OBJECT DIFFUSE Object Number, Color Value, VertexDiffuseMode
Object Number
Integer
The object number
Color Value
Dword
This command will alter the material diffuse component of the object
VertexDiffuseMode
Integer
This value is an integer number such as 1.
This command does not return a value.
The diffuse component makes up one of the factors that controls the final colour of the object, specifically the amount of light it receives from all available light sources. Can be used on INSTANCED OBJECTS, but if ALPHA MAPPING used, it will carry alpha in diffuse value.
sync on : sync rate 60 : hide mouse:cls 0:color backdrop 0
fog on:fog color 0:set ambient light 50
ObjectNumber=2:ImageNumber=2
wire=0:trans=0:cull=0:fliter=0:light=0:fog=0:ambient=0
set global object creation 0
set dir "models"
load object "ast4.x",ObjectNumber
set object specular ObjectNumber,0
rotate object ObjectNumber,270,0,0
set dir ".."
while mouseclick()<>2
SET OBJECT DIFFUSE ObjectNumber,rgb(0,0,255),0
if mouseclick()=1 then yrotate object ObjectNumber,wrapvalue(object angle y(ObjectNumber)+1)
sync
endwhile
while mouseclick()=1:endwhile
delete object ObjectNumber
end
BASIC3D Commands Menu
Index
|